package cn.edu.qut.edusys.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface ManagerMapper {

    List<Map<String,Object>> search(Map<String,String> param);

    List<Map<String,Object>> search_users(Map<String,String> param);

    List<Map<String,Object>> search_subjectNum(Map<String,String> param);

    @Insert("insert into t_subject_info" +
            "(subjectNumber,subjectName,subjectCredit)" +
            " values(#{subjectNumber},(#{subjectName})," +
            "#{subjectCredit})" )
    int add(Map<String,String> param);

    @Update("update t_subject_info" +
            " set subjectNumber=#{subjectNumber}," +
            " subjectName=#{subjectName}," +
            " subjectCredit=#{subjectCredit}" +
            " where subjectId=#{subjectId}")
    int update(Map<String,String> param);

    int delete(String[] ids);

    int delete_users(String[] ids);

}
